package cn.cqs.redisitem.config;

import cn.cqs.redisitem.interceptor.LonginInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//@Configuration
public class LoginInterceptorConfig implements WebMvcConfigurer {
//    @Autowired
    private LonginInterceptor loginInterceptor;

    /**
     * 用户登入拦截器
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor).addPathPatterns("/**").excludePathPatterns("/login/**");
    }
}
